/*
 * Copyright 2023 NXP
 * SPDX-License-Identifier: MIT
 */

#include "lvgl.h"
#include <stdio.h>
#include "gui_guider.h"
#include "events_init.h"

lv_style_t style_screen_1_img_8_main;
lv_style_t style_screen_1_img_10_main;
lv_style_t style_screen_1_img_9_main;
void setup_scr_screen_1(lv_ui *ui){

	//Write codes screen_1
	ui->screen_1 = lv_obj_create(NULL, NULL);

	//Write style LV_OBJ_PART_MAIN for screen_1
	static lv_style_t style_screen_1_main;
	lv_style_reset(&style_screen_1_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_main
	lv_style_set_bg_color(&style_screen_1_main, LV_STATE_DEFAULT, lv_color_make(0xb2, 0xf5, 0xdf));
	lv_style_set_bg_opa(&style_screen_1_main, LV_STATE_DEFAULT, 255);
	lv_obj_add_style(ui->screen_1, LV_OBJ_PART_MAIN, &style_screen_1_main);

	//Write codes screen_1_img_1
	ui->screen_1_img_1 = lv_img_create(ui->screen_1, NULL);

	//Write style LV_IMG_PART_MAIN for screen_1_img_1
	static lv_style_t style_screen_1_img_1_main;
	lv_style_reset(&style_screen_1_img_1_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_img_1_main
	lv_style_set_image_recolor(&style_screen_1_img_1_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_image_recolor_opa(&style_screen_1_img_1_main, LV_STATE_DEFAULT, 0);
	lv_style_set_image_opa(&style_screen_1_img_1_main, LV_STATE_DEFAULT, 255);
	lv_obj_add_style(ui->screen_1_img_1, LV_IMG_PART_MAIN, &style_screen_1_img_1_main);
	lv_obj_set_pos(ui->screen_1_img_1, 219, 6);
	lv_obj_set_size(ui->screen_1_img_1, 15, 10);
	lv_obj_set_click(ui->screen_1_img_1, true);
	lv_img_set_src(ui->screen_1_img_1,&_dian_alpha_15x10);
	lv_img_set_pivot(ui->screen_1_img_1, 0,0);
	lv_img_set_angle(ui->screen_1_img_1, 0);

	//Write codes screen_1_img_2
	ui->screen_1_img_2 = lv_img_create(ui->screen_1, NULL);

	//Write style LV_IMG_PART_MAIN for screen_1_img_2
	static lv_style_t style_screen_1_img_2_main;
	lv_style_reset(&style_screen_1_img_2_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_img_2_main
	lv_style_set_image_recolor(&style_screen_1_img_2_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_image_recolor_opa(&style_screen_1_img_2_main, LV_STATE_DEFAULT, 0);
	lv_style_set_image_opa(&style_screen_1_img_2_main, LV_STATE_DEFAULT, 255);
	lv_obj_add_style(ui->screen_1_img_2, LV_IMG_PART_MAIN, &style_screen_1_img_2_main);
	lv_obj_set_pos(ui->screen_1_img_2, 0, 0);
	lv_obj_set_size(ui->screen_1_img_2, 20, 20);
	lv_obj_set_click(ui->screen_1_img_2, true);
	lv_img_set_src(ui->screen_1_img_2,&_wifi_alpha_20x20);
	lv_img_set_pivot(ui->screen_1_img_2, 0,0);
	lv_img_set_angle(ui->screen_1_img_2, 0);

//	//Write codes screen_1_img_3
//	ui->screen_1_img_3 = lv_img_create(ui->screen_1, NULL);

//	//Write style LV_IMG_PART_MAIN for screen_1_img_3
//	static lv_style_t style_screen_1_img_3_main;
//	lv_style_reset(&style_screen_1_img_3_main);

//	//Write style state: LV_STATE_DEFAULT for style_screen_1_img_3_main
//	lv_style_set_image_recolor(&style_screen_1_img_3_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
//	lv_style_set_image_recolor_opa(&style_screen_1_img_3_main, LV_STATE_DEFAULT, 0);
//	lv_style_set_image_opa(&style_screen_1_img_3_main, LV_STATE_DEFAULT, 255);
//	lv_obj_add_style(ui->screen_1_img_3, LV_IMG_PART_MAIN, &style_screen_1_img_3_main);
//	lv_obj_set_pos(ui->screen_1_img_3, 0, 0);
//	lv_obj_set_size(ui->screen_1_img_3, 20, 20);
//	lv_obj_set_click(ui->screen_1_img_3, true);
//	lv_img_set_src(ui->screen_1_img_3,&_wifi_off_alpha_20x20);
//	lv_img_set_pivot(ui->screen_1_img_3, 0,0);
//	lv_img_set_angle(ui->screen_1_img_3, 0);

	//Write codes screen_1_img_5
	ui->screen_1_img_5 = lv_img_create(ui->screen_1, NULL);

	//Write style LV_IMG_PART_MAIN for screen_1_img_5
	static lv_style_t style_screen_1_img_5_main;
	lv_style_reset(&style_screen_1_img_5_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_img_5_main
	lv_style_set_image_recolor(&style_screen_1_img_5_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_image_recolor_opa(&style_screen_1_img_5_main, LV_STATE_DEFAULT, 0);
	lv_style_set_image_opa(&style_screen_1_img_5_main, LV_STATE_DEFAULT, 255);
	lv_obj_add_style(ui->screen_1_img_5, LV_IMG_PART_MAIN, &style_screen_1_img_5_main);
	lv_obj_set_pos(ui->screen_1_img_5, 5, 90);
	lv_obj_set_size(ui->screen_1_img_5, 35, 35);
	lv_obj_set_click(ui->screen_1_img_5, true);
	lv_img_set_src(ui->screen_1_img_5,&_co2_alpha_35x35);
	lv_img_set_pivot(ui->screen_1_img_5, 0,0);
	lv_img_set_angle(ui->screen_1_img_5, 0);

	//Write codes screen_1_img_6
	ui->screen_1_img_6 = lv_img_create(ui->screen_1, NULL);

	//Write style LV_IMG_PART_MAIN for screen_1_img_6
	static lv_style_t style_screen_1_img_6_main;
	lv_style_reset(&style_screen_1_img_6_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_img_6_main
	lv_style_set_image_recolor(&style_screen_1_img_6_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_image_recolor_opa(&style_screen_1_img_6_main, LV_STATE_DEFAULT, 0);
	lv_style_set_image_opa(&style_screen_1_img_6_main, LV_STATE_DEFAULT, 255);
	lv_obj_add_style(ui->screen_1_img_6, LV_IMG_PART_MAIN, &style_screen_1_img_6_main);
	lv_obj_set_pos(ui->screen_1_img_6, 4, 157);
	lv_obj_set_size(ui->screen_1_img_6, 35, 35);
	lv_obj_set_click(ui->screen_1_img_6, true);
	lv_img_set_src(ui->screen_1_img_6,&_CH2O_alpha_35x35);
	lv_img_set_pivot(ui->screen_1_img_6, 0,0);
	lv_img_set_angle(ui->screen_1_img_6, 0);

	//Write codes screen_1_img_7
	ui->screen_1_img_7 = lv_img_create(ui->screen_1, NULL);

	//Write style LV_IMG_PART_MAIN for screen_1_img_7
	static lv_style_t style_screen_1_img_7_main;
	lv_style_reset(&style_screen_1_img_7_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_img_7_main
	lv_style_set_image_recolor(&style_screen_1_img_7_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_image_recolor_opa(&style_screen_1_img_7_main, LV_STATE_DEFAULT, 0);
	lv_style_set_image_opa(&style_screen_1_img_7_main, LV_STATE_DEFAULT, 255);
	lv_obj_add_style(ui->screen_1_img_7, LV_IMG_PART_MAIN, &style_screen_1_img_7_main);
	lv_obj_set_pos(ui->screen_1_img_7, 5, 224);
	lv_obj_set_size(ui->screen_1_img_7, 35, 35);
	lv_obj_set_click(ui->screen_1_img_7, true);
	lv_img_set_src(ui->screen_1_img_7,&_TVOC_alpha_35x35);
	lv_img_set_pivot(ui->screen_1_img_7, 0,0);
	lv_img_set_angle(ui->screen_1_img_7, 0);

	//Write codes screen_1_label_1
	ui->screen_1_label_1 = lv_label_create(ui->screen_1, NULL);
	lv_label_set_text(ui->screen_1_label_1, "318 PPM");
	lv_label_set_long_mode(ui->screen_1_label_1, LV_LABEL_LONG_BREAK);
	lv_label_set_align(ui->screen_1_label_1, LV_LABEL_ALIGN_LEFT);

	//Write style LV_LABEL_PART_MAIN for screen_1_label_1
	static lv_style_t style_screen_1_label_1_main;
	lv_style_reset(&style_screen_1_label_1_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_label_1_main
	lv_style_set_radius(&style_screen_1_label_1_main, LV_STATE_DEFAULT, 0);
	lv_style_set_bg_color(&style_screen_1_label_1_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_bg_grad_color(&style_screen_1_label_1_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_bg_grad_dir(&style_screen_1_label_1_main, LV_STATE_DEFAULT, LV_GRAD_DIR_VER);
	lv_style_set_bg_opa(&style_screen_1_label_1_main, LV_STATE_DEFAULT, 0);
	lv_style_set_text_color(&style_screen_1_label_1_main, LV_STATE_DEFAULT, lv_color_make(0x00, 0x00, 0x00));
	lv_style_set_text_font(&style_screen_1_label_1_main, LV_STATE_DEFAULT, &lv_font_simsun_30);
	lv_style_set_text_letter_space(&style_screen_1_label_1_main, LV_STATE_DEFAULT, 1);
	lv_style_set_pad_left(&style_screen_1_label_1_main, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_right(&style_screen_1_label_1_main, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_top(&style_screen_1_label_1_main, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_bottom(&style_screen_1_label_1_main, LV_STATE_DEFAULT, 0);
	lv_obj_add_style(ui->screen_1_label_1, LV_LABEL_PART_MAIN, &style_screen_1_label_1_main);
	lv_obj_set_pos(ui->screen_1_label_1, 62, 93);
	lv_obj_set_size(ui->screen_1_label_1, 130, 0);

	//Write codes screen_1_img_8
	ui->screen_1_img_8 = lv_img_create(ui->screen_1, NULL);

	//Write style LV_IMG_PART_MAIN for screen_1_img_8
	//static lv_style_t style_screen_1_img_8_main;//改
	lv_style_reset(&style_screen_1_img_8_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_img_8_main
	lv_style_set_image_recolor(&style_screen_1_img_8_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_image_recolor_opa(&style_screen_1_img_8_main, LV_STATE_DEFAULT, 0);
	lv_style_set_image_opa(&style_screen_1_img_8_main, LV_STATE_DEFAULT, 0);//透明度
	lv_obj_add_style(ui->screen_1_img_8, LV_IMG_PART_MAIN, &style_screen_1_img_8_main);
	lv_obj_set_pos(ui->screen_1_img_8, 206, 100);
	lv_obj_set_size(ui->screen_1_img_8, 15, 15);
	lv_obj_set_click(ui->screen_1_img_8, true);
	lv_img_set_src(ui->screen_1_img_8,&_waring_alpha_15x15);
	lv_img_set_pivot(ui->screen_1_img_8, 0,0);
	lv_img_set_angle(ui->screen_1_img_8, 0);

	//Write codes screen_1_img_9
	ui->screen_1_img_9 = lv_img_create(ui->screen_1, NULL);

	//Write style LV_IMG_PART_MAIN for screen_1_img_9
	//static lv_style_t style_screen_1_img_9_main;//改
	lv_style_reset(&style_screen_1_img_9_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_img_9_main
	lv_style_set_image_recolor(&style_screen_1_img_9_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_image_recolor_opa(&style_screen_1_img_9_main, LV_STATE_DEFAULT, 0);
	lv_style_set_image_opa(&style_screen_1_img_9_main, LV_STATE_DEFAULT, 0);//透明度
	lv_obj_add_style(ui->screen_1_img_9, LV_IMG_PART_MAIN, &style_screen_1_img_9_main);
	lv_obj_set_pos(ui->screen_1_img_9, 209, 173);
	lv_obj_set_size(ui->screen_1_img_9, 15, 15);
	lv_obj_set_click(ui->screen_1_img_9, true);
	lv_img_set_src(ui->screen_1_img_9,&_waring_alpha_15x15);
	lv_img_set_pivot(ui->screen_1_img_9, 0,0);
	lv_img_set_angle(ui->screen_1_img_9, 0);

	//Write codes screen_1_img_10
	ui->screen_1_img_10 = lv_img_create(ui->screen_1, NULL);

	//Write style LV_IMG_PART_MAIN for screen_1_img_10
	//static lv_style_t style_screen_1_img_10_main;//改
	lv_style_reset(&style_screen_1_img_10_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_img_10_main
	lv_style_set_image_recolor(&style_screen_1_img_10_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_image_recolor_opa(&style_screen_1_img_10_main, LV_STATE_DEFAULT, 0);
	lv_style_set_image_opa(&style_screen_1_img_10_main, LV_STATE_DEFAULT, 0);//透明度
	lv_obj_add_style(ui->screen_1_img_10, LV_IMG_PART_MAIN, &style_screen_1_img_10_main);
	lv_obj_set_pos(ui->screen_1_img_10, 210, 235);
	lv_obj_set_size(ui->screen_1_img_10, 15, 15);
	lv_obj_set_click(ui->screen_1_img_10, true);
	lv_img_set_src(ui->screen_1_img_10,&_waring_alpha_15x15);
	lv_img_set_pivot(ui->screen_1_img_10, 0,0);
	lv_img_set_angle(ui->screen_1_img_10, 0);

	//Write codes screen_1_label_2
	ui->screen_1_label_2 = lv_label_create(ui->screen_1, NULL);
	lv_label_set_text(ui->screen_1_label_2, "0.1 PPM");
	lv_label_set_long_mode(ui->screen_1_label_2, LV_LABEL_LONG_BREAK);
	lv_label_set_align(ui->screen_1_label_2, LV_LABEL_ALIGN_LEFT);

	//Write style LV_LABEL_PART_MAIN for screen_1_label_2
	static lv_style_t style_screen_1_label_2_main;
	lv_style_reset(&style_screen_1_label_2_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_label_2_main
	lv_style_set_radius(&style_screen_1_label_2_main, LV_STATE_DEFAULT, 0);
	lv_style_set_bg_color(&style_screen_1_label_2_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_bg_grad_color(&style_screen_1_label_2_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_bg_grad_dir(&style_screen_1_label_2_main, LV_STATE_DEFAULT, LV_GRAD_DIR_VER);
	lv_style_set_bg_opa(&style_screen_1_label_2_main, LV_STATE_DEFAULT, 0);
	lv_style_set_text_color(&style_screen_1_label_2_main, LV_STATE_DEFAULT, lv_color_make(0x00, 0x00, 0x00));
	lv_style_set_text_font(&style_screen_1_label_2_main, LV_STATE_DEFAULT, &lv_font_simsun_30);
	lv_style_set_text_letter_space(&style_screen_1_label_2_main, LV_STATE_DEFAULT, 1);
	lv_style_set_pad_left(&style_screen_1_label_2_main, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_right(&style_screen_1_label_2_main, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_top(&style_screen_1_label_2_main, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_bottom(&style_screen_1_label_2_main, LV_STATE_DEFAULT, 0);
	lv_obj_add_style(ui->screen_1_label_2, LV_LABEL_PART_MAIN, &style_screen_1_label_2_main);
	lv_obj_set_pos(ui->screen_1_label_2, 62, 163);
	lv_obj_set_size(ui->screen_1_label_2, 130, 0);

	//Write codes screen_1_label_3
	ui->screen_1_label_3 = lv_label_create(ui->screen_1, NULL);
	lv_label_set_text(ui->screen_1_label_3, "0.01mg/m3");
	lv_label_set_long_mode(ui->screen_1_label_3, LV_LABEL_LONG_BREAK);
	lv_label_set_align(ui->screen_1_label_3, LV_LABEL_ALIGN_LEFT);

	//Write style LV_LABEL_PART_MAIN for screen_1_label_3
	static lv_style_t style_screen_1_label_3_main;
	lv_style_reset(&style_screen_1_label_3_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_label_3_main
	lv_style_set_radius(&style_screen_1_label_3_main, LV_STATE_DEFAULT, 0);
	lv_style_set_bg_color(&style_screen_1_label_3_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_bg_grad_color(&style_screen_1_label_3_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_bg_grad_dir(&style_screen_1_label_3_main, LV_STATE_DEFAULT, LV_GRAD_DIR_VER);
	lv_style_set_bg_opa(&style_screen_1_label_3_main, LV_STATE_DEFAULT, 0);
	lv_style_set_text_color(&style_screen_1_label_3_main, LV_STATE_DEFAULT, lv_color_make(0x00, 0x00, 0x00));
	lv_style_set_text_font(&style_screen_1_label_3_main, LV_STATE_DEFAULT, &lv_font_simsun_30);
	lv_style_set_text_letter_space(&style_screen_1_label_3_main, LV_STATE_DEFAULT, 1);
	lv_style_set_pad_left(&style_screen_1_label_3_main, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_right(&style_screen_1_label_3_main, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_top(&style_screen_1_label_3_main, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_bottom(&style_screen_1_label_3_main, LV_STATE_DEFAULT, 0);
	lv_obj_add_style(ui->screen_1_label_3, LV_LABEL_PART_MAIN, &style_screen_1_label_3_main);
	lv_obj_set_pos(ui->screen_1_label_3, 53, 227);
	lv_obj_set_size(ui->screen_1_label_3, 147, 0);

	//Write codes screen_1_label_4
	ui->screen_1_label_4 = lv_label_create(ui->screen_1, NULL);
	lv_label_set_text(ui->screen_1_label_4, "当前室内空气质量");
	lv_label_set_long_mode(ui->screen_1_label_4, LV_LABEL_LONG_BREAK);
	lv_label_set_align(ui->screen_1_label_4, LV_LABEL_ALIGN_CENTER);

	//Write style LV_LABEL_PART_MAIN for screen_1_label_4
	static lv_style_t style_screen_1_label_4_main;
	lv_style_reset(&style_screen_1_label_4_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_label_4_main
	lv_style_set_radius(&style_screen_1_label_4_main, LV_STATE_DEFAULT, 0);
	lv_style_set_bg_color(&style_screen_1_label_4_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_bg_grad_color(&style_screen_1_label_4_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_bg_grad_dir(&style_screen_1_label_4_main, LV_STATE_DEFAULT, LV_GRAD_DIR_VER);
	lv_style_set_bg_opa(&style_screen_1_label_4_main, LV_STATE_DEFAULT, 0);
	lv_style_set_text_color(&style_screen_1_label_4_main, LV_STATE_DEFAULT, lv_color_make(0x00, 0x00, 0x00));
	lv_style_set_text_font(&style_screen_1_label_4_main, LV_STATE_DEFAULT, &lv_font_simsun_28);
	lv_style_set_text_letter_space(&style_screen_1_label_4_main, LV_STATE_DEFAULT, 1);
	lv_style_set_pad_left(&style_screen_1_label_4_main, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_right(&style_screen_1_label_4_main, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_top(&style_screen_1_label_4_main, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_bottom(&style_screen_1_label_4_main, LV_STATE_DEFAULT, 0);
	lv_obj_add_style(ui->screen_1_label_4, LV_LABEL_PART_MAIN, &style_screen_1_label_4_main);
	lv_obj_set_pos(ui->screen_1_label_4, 0, 39);
	lv_obj_set_size(ui->screen_1_label_4, 240, 0);

	//Write codes screen_1_img_11
	ui->screen_1_img_11 = lv_img_create(ui->screen_1, NULL);

	//Write style LV_IMG_PART_MAIN for screen_1_img_11
	static lv_style_t style_screen_1_img_11_main;
	lv_style_reset(&style_screen_1_img_11_main);

	//Write style state: LV_STATE_DEFAULT for style_screen_1_img_11_main
	lv_style_set_image_recolor(&style_screen_1_img_11_main, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_image_recolor_opa(&style_screen_1_img_11_main, LV_STATE_DEFAULT, 0);
	lv_style_set_image_opa(&style_screen_1_img_11_main, LV_STATE_DEFAULT, 255);
	lv_obj_add_style(ui->screen_1_img_11, LV_IMG_PART_MAIN, &style_screen_1_img_11_main);
	lv_obj_set_pos(ui->screen_1_img_11, 113, 4);
	lv_obj_set_size(ui->screen_1_img_11, 15, 15);
	lv_obj_set_click(ui->screen_1_img_11, true);
	lv_img_set_src(ui->screen_1_img_11,&_air_alpha_15x15);
	lv_img_set_pivot(ui->screen_1_img_11, 0,0);
	lv_img_set_angle(ui->screen_1_img_11, 0);
}